package cn.mymall.constant;

import java.util.StringJoiner;

public class CachedCont {

	public static final int ONE_MINUTES = 60;

	public static final int FIVE_MINUTES = 5 * 60;

	/**
	 * 10分钟
	 */
	public static final int TEN_MINUTES = 10 * 60;

	/**
	 * 20分钟
	 */
	public static final int TWENTY_MINUTES = 20 * 60;

	/**
	 * 半小时
	 */
	public static final int HALF_HOUR = 30 * 60;

	/**
	 * 1小时
	 */
	public static final int ONE_HOUR = 1 * 60 * 60;

	/**
	 * 半天
	 */
	public static final int HALF_DAY = 1 * 12 * 60 * 60;

	/**
	 * 1天
	 */
	public static final int ONE_DAY = 1 * 24 * 60 * 60;

	/**
	 * 1个月
	 */
	public static final int ONE_MONTH = 1 * 30 * 24 * 60 * 60;

	public static String getCacheKey(Object...keys) {
		if(keys == null) return null;
		StringJoiner sj = new StringJoiner("_");
		for(Object key : keys){
			sj.add(String.valueOf(key));
		}
		return sj.toString();
	}
}
